<!--
  Copyright 2020 The Chromium Authors. All rights reserved.
  Use of this source code is governed by a BSD-style license that can be
  found in the LICENSE file.
-->
<script>
  async function go() {
    const importObj = {
      env: {
        memory: new WebAssembly.Memory({
          initial: 1,
          maximum: 1,
        }),
        __memory_base: 1024,
        table: new WebAssembly.Table({
          initial: 2,
          maximum: 2,
          element: 'anyfunc',
        }),
      },
    };

    const instance = await WebAssembly.instantiateStreaming(fetch('global_variable.wasm'), importObj);
    window.main = instance.instance.exports.Main;
  }
</script>
